/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jmooc.service;

import com.jmooc.dao.CourseModuleDao;
import com.jmooc.entity.Course;
import com.jmooc.entity.CourseModule;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author Group
 */
@Stateless
public class CourseModuleService implements Serializable {
     
    @EJB
    private CourseModuleDao courseModuleDao;
    
    public List<CourseModule> getAllByCourse(Course course) {
        return courseModuleDao.getAllByCourse(course);
    }
    
    public void create(CourseModule CourseModule) {
        courseModuleDao.create(CourseModule);
    }
    
    public CourseModule getById(Long id) {
        return courseModuleDao.getById(id);
    }
}
